package shili;

import org.apache.ibatis.binding.MapperRegistry;
import org.mybatis.spring.SqlSessionTemplate;
import shili.entity.SysUser;
import shili.entity.SysUserMapper;

import java.util.List;

/**
 * SysUserMapperImpl
 *
 * @author boy
 * @since 2023/10/18
 */
public class SysUserMapperImpl implements SysUserMapper {

    private SqlSessionTemplate sqlSession;
    private SysUserMapper sysUserMapper;

    @Override
    public List<SysUser> list(SysUser sysUser) {
        return sqlSession.getMapper(SysUserMapper.class).list(sysUser);
    }

    @Override
    public int add(SysUser sysUser) {
        return this.getSqlSession().getMapper(SysUserMapper.class).add(sysUser);
    }

    @Override
    public MapperRegistry getSqlSession() {
        return null;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }

    public void setSysUserMapper(SysUserMapper sysUserMapper) {
        this.sysUserMapper = sysUserMapper;
    }

}

